package com.echat.business.blog.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author chentl123
 * @since 2019-09-05
 */
@TableName("echo_business_blog")
public class Blog extends Model<Blog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 封面地址
     */
    private String coverUrl;
    /**
     * 标题
     */
    private String title;
    /**
     * 简介
     */
    private String intro;
    /**
     * 博客标签
     */
    private Integer blogTag;
    /**
     * 博客列表
     */
    @TableField(exist = false)
    private String blogTagList;
    /**
     * 博客类型
     */
    private Integer blogType;
    /**
     * 博客内容
     */
    private String blogContent;
    /**
     * 作者
     */
    private Integer author;
    /**
     * 是否发布 0 否 1 是
     */
    private Integer isPublished;
    /**
     * 创建人
     */
    private Integer createby;
    /**
     * 更新人
     */
    private Integer updateby;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;

    public String getBlogTagList() {
        return blogTagList;
    }

    public void setBlogTagList(String blogTagList) {
        this.blogTagList = blogTagList;
    }

    public String getBlogContent() {
        return blogContent;
    }

    public void setBlogContent(String blogContent) {
        this.blogContent = blogContent;
    }

    public Integer getIsPublished() {
        return isPublished;
    }

    public void setIsPublished(Integer isPublished) {
        this.isPublished = isPublished;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public Integer getBlogTag() {
        return blogTag;
    }

    public void setBlogTag(Integer blogTag) {
        this.blogTag = blogTag;
    }

    public Integer getBlogType() {
        return blogType;
    }

    public void setBlogType(Integer blogType) {
        this.blogType = blogType;
    }

    public Integer getAuthor() {
        return author;
    }

    public void setAuthor(Integer author) {
        this.author = author;
    }

    public Integer getCreateby() {
        return createby;
    }

    public void setCreateby(Integer createby) {
        this.createby = createby;
    }

    public Integer getUpdateby() {
        return updateby;
    }

    public void setUpdateby(Integer updateby) {
        this.updateby = updateby;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Blog{" +
                "id=" + id +
                ", coverUrl='" + coverUrl + '\'' +
                ", title='" + title + '\'' +
                ", intro='" + intro + '\'' +
                ", blogTag=" + blogTag +
                ", blogType=" + blogType +
                ", blogContent='" + blogContent + '\'' +
                ", author=" + author +
                ", isPublished=" + isPublished +
                ", createby=" + createby +
                ", updateby=" + updateby +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
